package com.xijia.wuyouwallet.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.xijia.wuyouwallet.R;
import com.xijia.wuyouwallet.activity.DimensionActivity;
import com.xijia.wuyouwallet.activity.GeneralizeMaterialActivity;
import com.xijia.wuyouwallet.activity.GeneralizeShareActivity;
import com.xijia.wuyouwallet.activity.PartnerRegisterActivity;
import com.xijia.wuyouwallet.activity.ShareLinkActivity;
import com.xijia.wuyouwallet.base.BaseFragment;

/**
 * Created by Administrator on 2017/7/11 0011.
 */

public class ExtendFragment extends BaseFragment implements View.OnClickListener{
    private LinearLayout extend_dimension_ll,extend_material_ll,extend_material_login_ll,extend_material_share_ll,extend_friend_ll;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_extend,null);
        initView(view);
        return view;
    }
    private void initView(View view){
        extend_dimension_ll = (LinearLayout) view.findViewById(R.id.extend_dimension_ll);
        extend_dimension_ll.setOnClickListener(this);
        extend_material_ll = (LinearLayout) view.findViewById(R.id.extend_material_ll);
        extend_material_ll.setOnClickListener(this);
        extend_material_login_ll = (LinearLayout) view.findViewById(R.id.extend_material_login_ll);
        extend_material_login_ll.setOnClickListener(this);
        extend_material_share_ll = (LinearLayout) view.findViewById(R.id.extend_material_share_ll);
        extend_material_share_ll.setOnClickListener(this);
        extend_friend_ll = (LinearLayout) view.findViewById(R.id.extend_friend_ll);
        extend_friend_ll.setOnClickListener(this);
    }
    @Override
    protected void lazyLoad() {
    }
    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.extend_dimension_ll://分享专属二维码
                jumpToPage(DimensionActivity.class);
                break;
            case R.id.extend_material_ll://推广素材库
                jumpToPage(GeneralizeMaterialActivity.class);
                break;
            case R.id.extend_material_login_ll://分享注册
                jumpToPage(ShareLinkActivity.class);
                break;
            case R.id.extend_material_share_ll://推广分享页
                jumpToPage(GeneralizeShareActivity.class);
                break;
            case R.id.extend_friend_ll://帮好友开通
                jumpToPage(PartnerRegisterActivity.class);
                break;
        }
    }
}
